package com.swjd.service.impl;

import com.swjd.dao.ConcernMapper;
import com.swjd.dao.UserMapper;
import com.swjd.pojo.Concern;
import com.swjd.pojo.User;
import com.swjd.pojo.UserKey;
import com.swjd.service.ConcernService;
import com.swjd.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by hxl on 2019/5/31  8:53
 */
@Service
public class ConcernServiceImpl implements ConcernService {

    @Autowired
    private ConcernMapper concernMapper;

    //根据用户名查询用户关注的其他用户
    @Override
    public List<String> selectConcern(String username) {
        return concernMapper.selectConcern(username);
    }


    //查询用户的粉丝
    @Override
    public List<String> selectFans(String concernName) {
        return concernMapper.selectFans(concernName);
    }

    //取消关注
    @Override
    public int deleteConcernName(Concern concern) {
        return concernMapper.deleteConcernName(concern);
    }
}
